<?php
/**
 * Created by PhpStorm.
 * User: lx
 * Date: 2020/1/3
 * Time: 16:12
 */
namespace app\mtadminapi\controller;
use app\mtadminapi\model\MtAdminSysAccount;
use app\command\controller\Common;
use app\util\ReturnCode;


/**
 * 管理员管理
 * Class AdminSysUser
 * @package app\mtadminapi\controller
 */
class AdminSysUser extends Base
{
    /**
     * 管理员信息修改
     * @return array
     */
    public function adminUserUpdate(){
        $data = $this->request->post();
        $adminID = $this->request->param("adminID");
        $obj = new MtAdminSysAccount();
            $data['mTime'] = time();
            $res = $obj->update($data,["adminID"=>$adminID]);
            if(!$res){
                return $this->bindError(ReturnCode::DB_SAVE_ERROR,"修改失败");
            }
            return $this->bindSuccess("修改成功");
    }
}